<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:func="http://dip.com.br/functions"
	>
	
	
	<table>
		<tr>
			<td>Menu:</td>
			<td>
				<p:inputText value="#{cadastroMenu.menu.descricao}"/>
			</td>
		</tr>
		<tr>
			<td>Modulo:</td>
			<td>
				<p:inputText disabled="true" value="#{cadastroMenu.menu.modulo.nome}"/>
			</td>
		</tr>
		<ui:fragment rendered="#{cadastroMenu.menu.mother!=null}">
		<tr>
			<td>Pai:</td>
			<td>
				<p:inputText disabled="true" value="#{cadastroMenu.menu.mother.descricao}"/>
			</td>
		</tr>
		</ui:fragment>
		<ui:fragment rendered="#{cadastroMenu.menu.tipoMenu==1}">
		<tr>
			<td>URL:</td>
			<td>
				<p:inputText  value="#{cadastroMenu.menu.url}"/>
			</td>
		</tr>
		</ui:fragment>
	</table>
	<p:commandButton onstart="#{popUpName}.hide()" action="#{cadastroMenu.acaoInserir}" update="#{ouvinteRendered}"   disabled="#{cadastroMenu.menu.id!=null}"  value="Salvar"/>		
	<p:commandButton onstart="#{popUpName}.hide()" action="#{cadastroMenu.acaoAlterar}"  pdate="#{ouvinteRendered}"  disabled="#{cadastroMenu.menu.id==null}" value="Alterar"/>
</ui:composition>